package com.atguigu.atomic;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Author 孔德成
 * @Slogan 致敬大师，致敬未来的你
 * @date 2021/8/9
 */
public class CASBeforeDemo {

    AtomicInteger number = new AtomicInteger();

    public int getNumber() {
        return number.get();
    }

    public void setNumber() {
        this.number.getAndIncrement();
    }
}
